﻿using Leeder.Util.Quartz;
using PartsRetrospect.Business;
using PartsRetrospect.Comm;
using PartsRetrospect.Model;
using PartsRetrospect.Task;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PartsRetrospect
{
    public class AppInitializer
    {
        /// <summary>
        /// 初始化
        /// </summary>
        public static void Init()
        {
            WorkShopSetBLL workShopSetBLL = new WorkShopSetBLL();
            GolbalVariable.DeviceStateChange = new DeviceStateChangeModel();
            GolbalVariable.UIAirbagList = new List<UIAirbagModel>();
            GolbalVariable.WorkShopSet = workShopSetBLL.GetModel();
            UploadSetModel sftpModel = new UploadSetBLL().GetModel();
            //AirbagBLL airbagBLL =new AirbagBLL();
            //初始化服务
            //QuartzHelper.ExecuteInterval<TaskTest>(10);
            //QuartzHelper.ExecuteByCron<TaskTest>("0 0 21 * * ?");
            //开启气囊数据定时上传作业
            QuartzHelper.ExecuteByCron<SFTPUploadTask>(sftpModel.UploadTime);
            //条码参数初始化
            new BarCodeConfiBLL().BarCodeConfigInit();
            //气囊码服务初始化
            //airbagBLL.Init();

        }
    }
}
